<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>发布文档</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/style/layout.css"/> 
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/style/content.css"/>
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
        <script type="text/javascript" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
        <script type="text/javascript" src="__PUBLIC__/SyntaxHighlighter/shCore.js"></script>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/SyntaxHighlighter/shCore.css"/>
        <script>
            $(function(){
                SyntaxHighlighter.all();//代码高亮解析
            })
            var kindeditoroptions={uploadJson:"<{:U('file/upload')}>",filePostName:"pic",extraFileUploadParams:{"subaction":"pic"},fileManagerJson:"<{:U('file/filelist')}>",allowFileManager:true};
            KindEditor.ready(function(K) {
                var editor = K.editor(kindeditoroptions);
                
                K('#litpic_upload').click(function() {
                    editor.uploadJson="<{:U('file/upload')}>";
                    editor.filePostName="litpic";
                    editor.extraFileUploadParams={"subaction":"litpic"};
                    editor.loadPlugin('image', function() {
                            editor.plugin.imageDialog({
                                    imageUrl : K('#litpic').val(),
                                    clickFn : function(url, title, width, height, border, align) {
                                            K('#litpic').val(url);
                                            editor.hideDialog();
                                    }
                            });
                    });
                });
                K('#litpic_filemanage').click(function() {
                        editor.fileManagerJson="<{:U('file/filelist')}>";
                        editor.loadPlugin('filemanager', function() {
                                editor.plugin.filemanagerDialog({
                                        viewType : 'VIEW',
                                        dirName : '',
                                        clickFn : function(url, title) {
                                                K('#litpic').val(url);
                                                editor.hideDialog();
                                        }
                                });
                        });
                });
            })
        </script>
    </head>
    <body>
        <div class="cbox col9 f_l">
        <form action='<{:U('add')}>' method="POST">
            <input type="hidden" name="cid" value="<{$cid}>"/>
            <input type="hidden" name="channelid" value="<{$cid}>"/>
            <div class="header"><h3>发布文档</h3></div>
            <div class="content">
                <div class="innerbox">
                    <fieldset class="col9">
                        <label>标题</label>
                        <div class="col6 f_l"><input type='text' name='title' style="width:90% "/></div><div class="f_l">特殊标记：<input type="checkbox" name="flag[]" value="h"/>头条 <input type="checkbox" name="flag[]" value="c"/>推荐 <input type="checkbox" name="flag[]" value="p"/>图片 </div>
                    </fieldset>
                    <fieldset class="col4 f_l">
                        <label>关键词</label>
                        <input type='text'class="col9" name='keywords'/>
                        <p>多个关键词请以 , 分隔</p>
                    </fieldset>
                    <fieldset class="col4 f_l">
                        <label>tags</label>
                        <input type='text' class="col9" name='tags'/>
                        <p>多个tag请以 , 分隔</p>
                    </fieldset>
                    <div class="f_c"></div>
                    <fieldset class="col9">
                        <label>描述</label>
                        <p>不多于250长度的字符串，一个汉字占3长度，英文占1长度</p>
                        <textarea name="description"></textarea>
                        
                    </fieldset>
                    <fieldset class="col9">
                        <label>分类</label>
                        <select name='typeid'>
                            <volist name='typelist' id='eachtype'>
                                <option value='<{$eachtype.id}>'>|<{$eachtype.lv|str_repeat='-',###}><{$eachtype.name}></option>
                            </volist>
                        </select>
                    </fieldset>
                    <fieldset class="col9">
                        <label>缩略图</label>
                        <p>上传的图片会被压缩成150x150的小图片</p>
                        <div class="col6 f_l"><input type='text' name='litpic' id="litpic" style="width:90% "/></div> <div class="f_l"><input type="button" value="浏览" id="litpic_upload"/> <input type="button" value="选取" id="litpic_filemanage"/></div>
                    </fieldset>
                    <{$addonform}>
                    <div class="f_c"></div>
                </div>
            </div>
            <div class="footer">
                <div class="submit f_r">
                    <input type="button" value="同步"  />
                    <input type="submit" value="Submit" class="subbtn"/>
                    <input type="reset" value="Reset"/>
                </div>
            </div>
        </form>
        </div>
        
    </body>
</html>
